const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const VueLoaderPlugin = require('vue-loader-plugin')
module.exports = {
    entry: './src/main.js',
    output: {
        filename: 'built.js',
        path: path.join(__dirname, 'dist')
    },
    module: {
        rules: [
            { test: /\.vue/, loader: 'vue-loader' },
            { test: /\.css/, use: ['style-loader', 'css-loader'] },
            { test: /\.jpeg|png|jpg|gif$/, loader: 'url-loader' },
            { test: /\.ttf|woff|woff2|eot|svg$/, loader: 'url-loader' }
        ]
    },
    plugins: [
        new HtmlWebpackPlugin({
            template: './src/index.html'
        }),
        new VueLoaderPlugin()
    ],
    mode: 'development',
    devServer: {
        contentBase: './dist',
        port: 8080,
        host: 'localhost'
    }
}